﻿
Partial Class WebForm_ManageSystemParameter
    Inherits System.Web.UI.Page
    Protected Sub SearchRegion1_Loaded(ByVal sender As Object, ByVal e As System.EventArgs) Handles SearchRegion1.Loaded
        'Me.SearchRegion1.BindGV()
    End Sub

    Protected Sub lknAddRegion_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lknAddRegion.Click
        Me.InitDataForAddRegion(Me.SearchRegion1.DefaultParentID)
    End Sub

    Protected Sub SearchRegion1_Updating(ByVal sender As Object, ByVal e As System.EventArgs) Handles SearchRegion1.Updating
        Me.InitDataForEditRegion()
    End Sub

    Protected Sub SearchRegion1_Adding(ByVal sender As Object, ByVal e As System.EventArgs) Handles SearchRegion1.Adding
        Me.InitDataForAddRegion(Me.SearchRegion1.DefaultParentID)
    End Sub

    Protected Sub SearchRegion1_Saving(ByVal sender As Object, ByVal e As System.EventArgs) Handles AddRegion1.Saved
        Me.InitDataForSearchRegion()
    End Sub

    Protected Sub SearchSystemParameter1_Updating(ByVal sender As Object, ByVal e As System.EventArgs) Handles SearchSystemParameter1.Updating
        Me.InitDataForUpdate()
    End Sub

    Protected Sub SearchSystemParameter1_Saving(ByVal sender As Object, ByVal e As System.EventArgs) Handles AddSystemParameter1.Saved
        Me.InitDataForSearch()

    End Sub

    'Protected Sub lknAddBulletin_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles lknAddBulletin.Click
    '    Me.InitDataForAddBulletin()
    'End Sub

    'Protected Sub SearchBulletin1_Updating(ByVal sender As Object, ByVal e As System.EventArgs) Handles SearchBulletin1.Updating
    '    Me.InitDataForEditBulletin()
    'End Sub

    'Protected Sub SearchBulletin1_Saving(ByVal sender As Object, ByVal e As System.EventArgs) Handles AddBulletin1.Saved
    '    Me.InitDataForSearchBulletin()
    'End Sub
End Class

Partial Class WebForm_ManageSystemParameter
    Private Sub InitDataForAddRegion()
        Me.TabContainer1.ActiveTab = Me.AddRegionTabPanel
        Me.AddRegion1.InitData()
    End Sub

    Private Sub InitDataForAddRegion(ByVal parent As String)
        Me.TabContainer1.ActiveTab = Me.AddRegionTabPanel
        Me.AddRegion1.DefaultParentID = parent
        Me.AddRegion1.InitData()
    End Sub

    Private Sub InitDataForEditRegion()
        Me.TabContainer1.ActiveTab = Me.AddRegionTabPanel
        Me.AddRegion1.InitData(Me.SearchRegion1.SelectedRegionID)
    End Sub

    Private Sub InitDataForSearchRegion()
        Me.TabContainer1.ActiveTab = Me.SearchRegionTabPanel
        Me.SearchRegion1.BindGV(Me.AddRegion1.RegionID)
    End Sub

    Private Sub InitDataForUpdate()
        Me.TabContainer1.ActiveTab = Me.AddParameterTabPanel
        Me.AddSystemParameter1.InitData(Me.SearchSystemParameter1.SelectedParameterType, Me.SearchSystemParameter1.SelectedParameterName)

    End Sub

    Private Sub InitDataForSearch()

        Dim type As String = CType(CType(Me.AddSystemParameter1.FindControl("fvParameter"), FormView).FindControl("lblText"), Label).Text
        Dim name As String = CType(CType(Me.AddSystemParameter1.FindControl("fvParameter"), FormView).FindControl("lblParameterNmae1"), Label).Text

        Me.TabContainer1.ActiveTab = Me.SearchParameterTabPanel
        Me.SearchSystemParameter1.BindGV1(type, name, "", "", "全部")

    End Sub

    'Private Sub InitDataForAddBulletin()
    '    Me.TabContainer1.ActiveTab = Me.AddBulletinTabPanel
    '    Me.AddBulletin1.InitData()
    'End Sub

    'Private Sub InitDataForEditBulletin()
    '    Me.TabContainer1.ActiveTab = Me.AddBulletinTabPanel
    '    Me.AddBulletin1.InitData(Me.SearchBulletin1.SelectedBulletinID)
    'End Sub

    'Private Sub InitDataForSearchBulletin()
    '    Me.TabContainer1.ActiveTab = Me.SearchBulletinTabPanel
    '    Me.SearchBulletin1.BindGV(Me.AddBulletin1.BulletinID)
    'End Sub
End Class